#!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2023/1/28 18:59
# @Author : caoshi
# @Version：V1.0
# @File : 01-变量.py
# @desc :
"""
    变量的数据类型可以随时改变
    使用内置函数 type() 检测某个变量的类型
"""
num = 123
# print(num, type(num))   # 123 <class 'int'>
num = "hello"
# print(num, type(num))   # hello <class 'str'>

###########################################################################

"""
    整数类型
        Python中只有一种类型的的整数，就只有int
        Python 整数的取值范围是无限的，不管多大或者多小的数字
"""

n = 11
n2 = 77777777777777777777777777777777777
# print(n2)

"""
    浮点类型
    
"""
f1 = 12.5
# print("f1Value: ", f1)
# print("f1Type: ", type(f1))

f2 = 0.34557808421257003
# print("f2Value: ", f2)  # 0.34557808421257
# print("f2Type: ", type(f2))

f5 = 12e4
# print("f5Value: ", f5)    # 120000.0
# print("f5Type: ", type(f5))   # <class 'float'>

"""
    复数类型
        复数的虚部以j或者J作为后缀
    格式为： a + bj
"""
c1 = 12 + 0.2j
# print(c1)   # (12+0.2j)


"""
    字符串
    由双引号" "或者单引号' '包围
"""

s1 = "hello world"
s2 = 'hi hi hi'''
# print(s1, type(s1))     # hello world <class 'str'>
# print(s2, type(s2))     # hi hi hi <class 'str'>


# 变量的id与type
name = '张三'
age = 18
price = 3.6

# id()  1825172854416
# print(id(name))

# type()    <class 'str'>
# print(type(name))


a = '张大仙'
b = '张大仙'
print(a, b)
print(id(a), id(b))

